package com.example.fw;

import org.openqa.selenium.By;

public class NavigationHelper extends HelperWithWebDriverBase {
	
	public NavigationHelper(ApplicationManager manager) {
		super(manager);
	}

	public void goToGroupListPage() {
		if (driver.findElements(By.xpath(manager.getProperty("newGroupXpath"))).size() > 0) {
			return;
			}	
		click(By.linkText(manager.getProperty("groupsId")));
	}
	
	public void openMainPage() {
		if (driver.findElements(By.id(manager.getProperty("tableId"))).size() > 0) {
			return;
			}
		openUrl(manager.getProperty("baseUrl"));
	}
	
	public void goToContactListPage() {
		click(By.linkText(manager.getProperty("addGroupsId")));
	}

}
